//
//  ZHIMFileBody.h
//  ZHIMCore
//
//  Created by Chen Zhangli on 2021/1/20.
//

#import "ZHIMMessageBody.h"

NS_ASSUME_NONNULL_BEGIN

extern ZHIMFileType ZHIMFileRepresentation(NSString * __nonnull url);

@interface ZHIMFileBody : ZHIMMessageBody

/// 文件名称
@property (nonatomic, copy) NSString *fileName;
/// 文件扩展名
@property (nonatomic, copy) NSString *fileExtension;
/// 文件地址
@property (nonatomic, copy) NSString *fileUrl;
/// 文件本地路径
@property (nonatomic, copy) NSString *localPath;
/// 文件大小
@property (nonatomic, assign) long long fileLength;

@property (nonatomic, strong) NSData *data;

- (void)download:(void(^)(NSURL *url))completion;

@end

NS_ASSUME_NONNULL_END
